<template>
	<view class="card">
		<uni-card :title="props.title" :extra="props.extra" padding="10px 0">
			<text class="uni-body uni-mt-5">
				<slot></slot>
			</text>
			<view v-show='footShow' slot="actions" class="card-actions">
				<slot name="foot"></slot>
			</view>
		</uni-card>
	</view>

</template>

<script setup>
import {
	ref,
	defineProps
} from "vue"
let props = defineProps({
	footShow: {
		type: Boolean,
		default: false
	},
	title: {
		type: String,
		default: "标题"
	},
	extra: {
		type: String,
		default: "副标题"
	}
})
</script>

<style scoped lang="scss">
.card {
	position: relative;
	margin-top: 30rpx;
}

.cardImg {
	position: absolute;
	top: 24rpx;
	left: 1.03125rem;
	width: 30rpx;
	height: 30rpx;

	image {
		width: 100%;
		height: 100%;
	}
}

.container {
	overflow: hidden;
}

.custom-cover {
	flex: 1;
	flex-direction: row;
	position: relative;
}

.cover-content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 40px;
	background-color: rgba($color: #000000, $alpha: 0.4);
	display: flex;
	flex-direction: row;
	align-items: center;
	padding-left: 15px;
	font-size: 14px;
	color: #fff;
}

.card-actions {
	display: flex;
	flex-direction: row;
	justify-content: space-around;
	align-items: center;
	height: 45px;
	border-top: 1px #eee solid;
}

.card-actions-item {
	display: flex;
	flex-direction: row;
	align-items: center;
}

.card-actions-item-text {
	font-size: 12px;
	color: #666;
	margin-left: 5px;
}

.cover-image {
	flex: 1;
	height: 150px;
}

.no-border {
	border-width: 0;
}

</style>